package cn.iocoder.yudao.module.form.service.impl;

import cn.iocoder.yudao.module.form.dataobject.FormChooseChart;
import cn.iocoder.yudao.module.form.mysql.FormChooseChartMapper;
import cn.iocoder.yudao.module.form.service.IFormChooseChartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 报表图表对应Service业务层处理
 *
 * @author Fan KaiXiang
 * @date 2022-08-31
 */
@Service
public class FormChooseChartServiceImpl implements IFormChooseChartService
{
    @Autowired
    private FormChooseChartMapper formChooseChartMapper;

    /**
     * 查询报表图表对应
     *
     * @param id 报表图表对应主键
     * @return 报表图表对应
     */
    @Override
    public FormChooseChart selectFormChooseChartById(Long id)
    {
        return formChooseChartMapper.selectFormChooseChartById(id);
    }

    /**
     * 查询报表图表对应列表
     *
     * @param formChooseChart 报表图表对应
     * @return 报表图表对应
     */
    @Override
    public List<FormChooseChart> selectFormChooseChartList(FormChooseChart formChooseChart)
    {
        return formChooseChartMapper.selectFormChooseChartList(formChooseChart);
    }

    /**
     * 新增报表图表对应
     *
     * @param formChooseChart 报表图表对应
     * @return 结果
     */
    @Override
    public int insertFormChooseChart(FormChooseChart formChooseChart)
    {
        return formChooseChartMapper.insertFormChooseChart(formChooseChart);
    }

    /**
     * 修改报表图表对应
     *
     * @param formChooseChart 报表图表对应
     * @return 结果
     */
    @Override
    public int updateFormChooseChart(FormChooseChart formChooseChart)
    {
        return formChooseChartMapper.updateFormChooseChart(formChooseChart);
    }

    /**
     * 批量删除报表图表对应
     *
     * @param ids 需要删除的报表图表对应主键
     * @return 结果
     */
    @Override
    public int deleteFormChooseChartByIds(Long[] ids)
    {
        return formChooseChartMapper.deleteFormChooseChartByIds(ids);
    }

    @Override
    public int deleteByFromIdAndChartId(FormChooseChart formChooseChart) {
        return formChooseChartMapper.deleteByFromIdAndChartId(formChooseChart);
    }

    /**
     * 删除报表图表对应信息
     *
     * @param id 报表图表对应主键
     * @return 结果
     */
    @Override
    public int deleteFormChooseChartById(Long id)
    {
        return formChooseChartMapper.deleteFormChooseChartById(id);
    }
}
